<!DOCTYPE html>
<html>

<head>
    <title>Example</title>
    <meta name="author" content="Adam Freeman" />
    <meta name="description" content="A simple example" />
    <link rel="shortcut icon" type="image/x-icon" href="./favicon.ico">
    <style>
        thead th, tfoot th{
            text-align: left;
            background: grey;
            color: white;
        }

        tbody th {
            text-align: right;
            background: lightgrey;
            color: grey;
        }
    </style>
</head>

<body>
    <table>
        <!-- thead元素 表示表格的标题行 -->
        <thead>
            <tr>
                <th>Rank</th>
                <th>Name</th>
                <th>Color</th>
                <th>Size</th>
            </tr>
        </thead>
        <!-- tbody元素 表示表格主题的全体行（不包括表头行和表脚行） -->
        <tbody>
            <tr>
                <th>Favorite:</th>
                <td>Apples</td>
                <td>Green</td>
                <td>Medium</td>
            </tr>
            <tr>
                <th>2nd Favorite:</th>
                <td>Oranges</td>
                <td>Orange</td>
                <td>Large</td>
            </tr>
            <tr>
                <th>3rd Favorite:</th>
                <td>Pomegranate</td>
                <td>A kind of greeny-red</td>
                <td>Varies from medium to large</td>
            </tr>
        </tbody>
        <!-- tfoot元素 表格生成表脚 -->
        <tfoot>
            <tr>
                <th>Rank</th>
                <th>Name</th>
                <th>Color</th>
                <th>Size</th>
            </tr>
        </tfoot>
    </table>
</body>

</html>